import axios from "axios";

const request = axios.create({
  // baseURL: "https://app-166072354509830337.lititi.com/",
  baseURL: "/dev-api",
  timeout: 10000,
  headers: {
    "Content-Type": "application/x-www-form-urlencoded",
    "APP-No": "166072354509830337",
    "Shop-No": "166072354520574632",
    // "Content-Type": "multipart/form-data",
  },
});

// 添加请求拦截器
request.interceptors.request.use(
  function (config) {
    return config;
  },
  function (error) {
    return Promise.reject(error);
  }
);

// 添加响应拦截器
request.interceptors.response.use(
  (response) => {
    return response.data;
  },

  (error) => {
    return error;
  }
);

export default request;
